package com.pencilisland.pay.api.bean.mp.app;

import java.io.Serializable;
import java.util.List;
import java.util.ArrayList;

import java.math.BigDecimal;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;


/**
 * 查询商品信息.服务端响应
 * 
 * messageId[queryGoods] 
 *
 * @author breeze
 * 
 */
@JsonInclude(Include.NON_NULL)
public class QueryGoodsRES extends MessageResponse implements Serializable{
	
	private static final long serialVersionUID = 1L;

	@JsonInclude(Include.NON_NULL)
	public static class ElementImgDetails implements Serializable{
		private static final long serialVersionUID = 1L;
		private String url;
		private Integer type;

		/**
		 * @return 图片链接
		 */
		public String getUrl() {
			return url;
		}

		public void setUrl(String url) {
			this.url = url;
		}

		/**
		 * @return 图片类型
		 */
		public Integer getType() {
			return type;
		}

		public void setType(Integer type) {
			this.type = type;
		}
	
	/**
	*设置挡板数据
	*/
	public void baffle(){
		this.url = "";
		this.type = 0;
	}
	}

	private String goodsCode;
	private String name;
	private String remark;
	private BigDecimal price;
	private String freePost;
	private Integer stock;
	private List<ElementImgDetails> imgDetails;

	public QueryGoodsRES(){
		super();
	}

	public QueryGoodsRES(Boolean success_,Integer errorCode_, String message_) {
		super(success_,errorCode_,message_);
	}


	/**
	 * @return 商品编号
	 */
	public String getGoodsCode() {
		return goodsCode;
	}

	public void setGoodsCode(String goodsCode) {
		this.goodsCode = goodsCode;
	}

	/**
	 * @return 商品名称
	 */
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return 商品描述
	 */
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	/**
	 * @return 商品单价
	 */
	public BigDecimal getPrice() {
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	/**
	 * @return 是否包邮（0：否1：是）
	 */
	public String getFreePost() {
		return freePost;
	}

	public void setFreePost(String freePost) {
		this.freePost = freePost;
	}

	/**
	 * @return 库存
	 */
	public Integer getStock() {
		return stock;
	}

	public void setStock(Integer stock) {
		this.stock = stock;
	}

	/**
	 * @return 
	 */
	public List<ElementImgDetails> getImgDetails() {
		return imgDetails;
	}

	public void setImgDetails(List<ElementImgDetails> imgDetails) {
		this.imgDetails = imgDetails;
	}
	
	/**
	*设置挡板数据
	*/
	public void baffle(){
		this.goodsCode = "";
		this.name = "";
		this.remark = "";
		this.price = new BigDecimal("0");
		this.freePost = "";
		this.stock = 0;
		this.imgDetails = new ArrayList<ElementImgDetails>();
		ElementImgDetails elementImgDetails = new ElementImgDetails();
		elementImgDetails.baffle();
		this.imgDetails.add(elementImgDetails);
	}

}